package com.yesep.learn.design.common.pojo;

public class CPUComponent extends ComputerComponent {
    public CPUComponent() {

    }

    public CPUComponent(String model, double consumption) {
        this();
        setModel(model);
        setConsumption(consumption);
    }

    public void freeze() {
        System.out.printf("The %s %s is freeze. \n", this.getClass().getSimpleName().toLowerCase(), getModel());
    }

    public void execute(String command) {
        System.out.printf("The %s %s is executing command %s. \n", this.getClass().getSimpleName().toLowerCase(), getModel(), command);
    }
}
